package com.easwift.qsp.util;

/**
 * 计算公式工具类
 * 
 * @author Administrator
 *
 */
public class FormulaUtils {

	// 加速度计
	public static double accelerate(double a, double x) {
		return a * x;
	}

	// 超声风速
	public static double superWindSpeed(double x) {
		return x * 10;
	}

	// 超声风向
	public static double superWindDirection(double x) {
		return x * 108;
	}

	// 风仰角
	public static double windAngle(double x) {
		return 24 * x - 60;
	}

	// 温度
	public static double temperature(double x) {
		return 20 * x + 220 - 273.15;
	}

	// 倾角仪
	public static double leanAngle(double x, double alp) {
		return Math.asin(x / 21.64) - alp;
	}

	// 风压传感器
	public static double windPressure(double b, double x, double c) {
		return b * x - c;
	}

	// 机械风速
	public static double machineWindSpeed(double x) {
		return x * 4 * 6.25 - 25;
	}

	// 机械风向
	public static double machineWindDirection(double x) {
		return x * 4 * 22.5 - 90;
	}

}